using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Snake.Client
{
    public class Health
    {
        public Health()
        {
            Value = 1;
        }

        public double Value { get; private set; }
        public bool Zero
        {
            get { return Value == 0; }
        }

        public void Heal()
        {
            Value += GameInfo.HealthQuant;
            if (Value > 1)
            {
                Value = 1;
            }
        }
        public void Hurt()
        {
            Value -= GameInfo.HealthQuant;
            if (Value < 0)
            {
                Value = 0;
            }
        }
    }
}
